var TIMER_ID = "",
    WIFI_TIMER = "",
    SCAN_DEVICE = "",
    INSTANCE_TOAST = "",
    TIMER = 0,
    TIMER_DROP = "",
    ECHARTS = "echarts",
    STATISTICS = []
    STATISTICS_TIME = [],
    PARENT_MACS = [],
    ISCROLL_BAR = "",
    CURRSCALE = 1,
    ISCROLL_CHART = "",
    ISCROLL_DEVICE = "",
    ISCROLL_TABLE = "",
    BODY_WIDTH = 0,
    TODAY_CHART = "",
    MONTH_CHART = "",
    PIE_CHART = "",
    STRUCTURE_CHART = [],
    MAX_RSSI = -55,
    MIN_RSSI = -100,
    DEVICE_EVENT_FILE = "DEVICEEVENT",
    DEVICE_LIST_FILE = "DEVICEFILE",
    APP_USER_INFO = "APPUSERINFO",
    DEVICE_GROUP_LIST = "DEVICEGROUPLIST",
    ROOM_LIST = "ROOMLIST",
    COMMAND_LIST_FILE = "commandList";
    INDEX_URL= "file:///android_asset/web/index.html",
    TABLE_URL = "file:///android_asset/web/table.html",
    JSPLUMB_INSTANCE = "",
    JSPLUMB_INITNODE = "",
    LINE_COLOR = "#FEA463",
    TOUCH_SCALE = 1,
    TOUCH_TIME = 0,
    WIFI_SSID = "wifi_ssid",
    DEVICE_LIST = "device_list",
    DEVICE_BOOLEAN = "device_boolean",
    DEVICE_CHILD_LIST = "",
    MIN_LIGHT = 1,
    MAX_LIGHT = 10,
    MIN_SWITCH = 11,
    MAX_SWITCH = 20,
    MIN_SENSOR = 21,
    MAX_SENSOR = 30,
    MIN_RELAY = 41,
    MAX_RELAY = 50,
    MIN_CAR = 51,
    MAC_CAR = 60,
    MIN_OTHER = 81,
    MAX_OTHER = 999999999,
    TOUCH_PAD_SWITCH = 12,
    BUTTON_SWITCH = 13,
    BUTTON_SWITCH_14 = 14,
    SENSOR_23 = 23,
    SENSOR_24 = 24,
    STATUS_CID = 0,
    HUE_CID = 1,
    SATURATION_CID = 2,
    VALUE_CID = 3,
    TEMPERATURE_CID = 4,
    BRIGHTNESS_CID = 5,
    SENSOR_TEMPERATURE_CID = 2,
    SENSOR_HUMIDITY_CID = 1,
    SENSOR_LUMINANCE_CID = 0,
    SENSOR_TEMPERATURE_NAME = "temperature",
    SENSOR_HUMIDITY_NAME = "humidity",
    SENSOR_LUMINANCE_NAME = "luminance",
    MODE_CID = 6,
    MODE_HSV = 2,
    MODE_CTB = 3,
    DEFAULT_ON = 255,
    DEFAULT_OFF = 0,
    TOUC_PAD_BTN_0 = 0,
    TOUC_PAD_BTN_1 = 1,
    TOUC_PAD_BTN_2 = 2,
    TOUC_PAD_BTN_3 = 3,
    SYSC_RED_HUE = 0,
    SYSC_RED_SATURATION = 100,
    SYSC_GREEN_HUE = 120,
    SYSC_GREEN_SATURATION = 100,
    SYSC_BLUE_HUE = 240,
    SYSC_BLUE_SATURATION = 100,
    STATUS_ON = 1,
    STATUS_OFF = 0,
    SWITCH_CID = 0,
    SENSOR_CID = 0,
    SENSOR24_CID_3 = 3,
    SENSOR24_CID_2 = 2,
    BUTTON_EVENT_1 = 1,
    BUTTON_EVENT_2 = 2,
    BUTTON_EVENT_3 = 3,
    BUTTON_EVENT_4 = 4,
    BUTTON_EVENT_5 = 5,
    BUTTON_EVENT_6 = 6,
    BUTTON_EVENT_7 = 7,
    BUTTON_EVENT_8 = 8,
    BUTTON_EVENT_9 = 9,
    ON_EN = "ON",
    OFF_EN = "OFF",
    WHITE_EN = "WHITE",
    RED_EN = "RED",
    GREEN_EN = "GREEN",
    BLUE_EN = "BLUE",
    YELLOW_EN = "YELLOW",
    PURPLE_EN = "PURPLE",
    TURN_OFF ="TURN_OFF",
    TURN_ON ="TURN_ON",
    OPERATOR_EQUAL = "==",
    OPERATOR_MIN = ">",
    OPERATOR_MAX = "<",
    OPERATOR_VARIETY = "~",
    OPERATOR_COMPARE = "/",
    SLOW_VALUE = 50,
    MESH_LIGHT_SYSC = {'~': 1},
    MESH_LIGHT_SYSC_COLOR = {'==': 1},
    MESH_LIGHT_SYSC_COLOR_0 = {'==': 0}
    MESH_LIGHT_SYSC_COLOR_2 = {'==': 2},
    MESH_LIGHT_SYSC_COLOR_3 = {'==': 3},
    MESH_LIGHT_SYSC_COLOR_4 = {'==': 4},
    MESH_LIGHT_SYSC_COLOR_5 = {'==': 5},
    MESH_LIGHT_ON_COMPARE = {'==': 1, '~': 1},
    MESH_LIGHT_OFF_COMPARE = {'==': 0, '~': 1},
    MESH_SENSOR_OFF_COMPARE = {'>': 1000},
    MESH_SENSOR_ON_COMPARE = {'<': 200},
    MESH_SENSOR_MAX = 1000,
    EVENT_LIST = [],
    MESH_LIST= [],
    MESH_IP = "",
    SINGLE_GROUP = 1,
    MULTIPLE_GROUP = 2,
    DEVICE_IP = "host",
    MESH_INFO = "mesh_info",
    DEVICE_REQUEST = "device_request",
    DEVICE_INFO = "get_device_info",
    SET_EVENT = "set_event",
    GET_EVENT = "get_event",
    REMOVE_EVENT = "remove_event",
    SET_STATUS = "set_status",
    RESET_DEVICE = "reset",
    RENAME_DEVICE = "rename_device",
    SET_POSITION = "set_position",
    ADD_DEVICE = "add_device",
    GET_IBEACON = "get_ibeacon_config",
    SET_IBEACON = "set_ibeacon_config",
    GET_SNIFFER = "get_sniffer_config",
    SET_SNIFFER = "set_sniffer_config",
    SET_CALENDAR ="set_calendar",
    GTE_CALENDAR ="get_calendar",
    REMOVE_CALENDAR ="remove_calendar",
    GET_MESH = "get_mesh_config",
    SET_REGULAR_CONTROL = "set_regular_control",
    SET_SLOW_SWITCH = "set_slow_switch",
    SET_SERVER = "set_server",
    SET_GROUP = "set_group",
    GET_GROUP = "get_group",
    REMOVE_GROUP = "remove_group",
    GET_TSF_TIME = "get_tsf_time",
    OTA_FALLBACK = "set_ota_fallback",
    SYSC = "sync",
    CONTROL = "linkage",
    MESH_HEADER_NUM = 1,
    MESH_REQUEST = "request",
    MESH_CALENDAR = "calendar",
    MESH_MAC = "mac",
    MESH_GROUP = "group",
    DEVICE_DELAY = "delay",
    NO_RESPONSE = "root_response",
    WALL_CONTROL_CONFIG_SET = "wall_control_config_set",
    WALL_CONTROL_CONFIG_GET = "wall_control_config_get",
    BEACON_MDF = "MDF",
    BEACON_MGW = "MGW",
    BEACON_MAY = "MAY",
    DELAY_TIME = 3000,
    DEL_WIDTH = 120,
    DEL_HEIGHT = 120,
    DEVICE_WIDTH = 80,
    DEVICE_HEIGHT = 30,
    DEVICE_TOP = 0,
    DEVICE_LEFT = 0,
    INIT_SIZE = 230;
    EVENT_TYPE = ["sync", "linkage"],
    LIGHT_CID_LIST = [0, 1, 2, 3, 4 , 5],
    SWITCH_CID_LIST = [0],
    SWITCH_TOUCH_CID_LIST = [0, 1, 2, 3],
    SENSOR_CID_LIST = [0],
    COL_NUM = 5,
    ROW_NUM = 5,
    POSITION_TOP = 0,
    POSITION_LEFT = 0,
    EXEC_FREQ = 1,
    RECENT_TYPE_DEVICE = "device",
    BIN_URL = "https://raw.githubusercontent.com/EspressifApp/Esp32MeshAppResources/master/bin/esp-light.bin",
    BIN_VERSION = "https://raw.githubusercontent.com/EspressifApp/Esp32MeshAppResources/master/bin/info.json",
    SNIFFER_CLASS = [{"value":"0", "label": "Disable"}, {"value":"1", "label": "Enable"}],
    SNIFFER_TYPE = [{"value":"0", "label": "OFF"}, {"value":"1", "label": "Wi-Fi"}, {"value":"2", "label": "BLE"},
        {"value":"3", "label": "Wi-Fi+BLE"}],
    SNIFFER_TYPE_SELECT = [{"value":"1", "label": "WiFi"}, {"value":"2", "label": "Ble"}],
    SNIFFER_FILTER = [{"value":"0", "label": "No"}, {"value":"1", "label": "Yes"}],
    RECENT_TYPE_GROUP = "group",
    HOLIDAY = ["2018-1-1", "2018-1-15", "2018-1-16", "2018-1-17", "2018-1-18", "2018-1-19", "2018-1-20", "2018-1-21",
            "2018-4-5", "2018-4-6", "2018-4-7", "2018-4-29", "2018-4-30", "2018-5-1", "2018-6-16", "2018-6-17", "2018-6-18",
            "2018-9-22","2018-9-23", "2018-9-24", "2018-10-1", "2018-10-2", "2018-10-3", "2018-10-4", "2018-10-5", "2018-10-6",
            "2018-10-7"],
    OVERTIME = ["2018-1-24", "2018-4-8", "2018-4-28", "2018-9-29", "2018-9-30"],
    BUTTON_DEVICES = {"upleft": 0, "upright": 1, "downleft": 2, "downright": 3},
    SENSOR24_COLOR = {"white": {"h": 0, "s": 0, "v": 100}, "red": {"h": 0, "s": 100, "v": 100},
        "green": {"h": 120, "s": 100, "v": 100}, "blue": {"h": 240, "s": 100, "v": 100},
        "yellow": {"h": 60, "s": 100, "v": 100}, "purple": {"h": 300, "s": 100, "v": 50}},
    VIDEO_URL = "https://www.espressif.com/zh-hans/products/software/esp-mesh/overview",
    SHOP_URL="https://shop40342744.m.youzan.com/wscgoods/detail/1yaarv53q6eb4?banner_id=f.69280674~goods.7~2~D9kJXm8U",
    constant_202 = {
        SERIALNUMBER_2F_202_A1: '2F-202-A-001',
        SERIALNUMBER_2F_202_A2: '2F-202-A-002',
        SERIALNUMBER_2F_202_A3: '2F-202-A-003',
        SERIALNUMBER_2F_202_A4: '2F-202-A-004',
        SERIALNUMBER_2F_202_A5: '2F-202-A-005',
        SERIALNUMBER_2F_202_A6: '2F-202-A-006',
        SERIALNUMBER_2F_202_A7: '2F-202-A-007',
        SERIALNUMBER_2F_202_A8: '2F-202-A-008',
        SERIALNUMBER_2F_202_A9: '2F-202-A-009',
        SERIALNUMBER_2F_202_A10: '2F-202-A-010',
        SERIALNUMBER_2F_202_A11: '2F-202-A-011',
        SERIALNUMBER_2F_202_A12: '2F-202-A-012',
        SERIALNUMBER_2F_202_A13: '2F-202-A-013',
        SERIALNUMBER_2F_202_A14: '2F-202-A-014',
        SERIALNUMBER_2F_202_B1: '2F-202-B-001',
        SERIALNUMBER_2F_202_B2: '2F-202-B-002',
        SERIALNUMBER_2F_202_B3: '2F-202-B-003',
        SERIALNUMBER_2F_202_B4: '2F-202-B-004',
        SERIALNUMBER_2F_202_B5: '2F-202-B-005',
        SERIALNUMBER_2F_202_B6: '2F-202-B-006',
        SERIALNUMBER_2F_202_B7: '2F-202-B-007',
        SERIALNUMBER_2F_202_B8: '2F-202-B-008',
        SERIALNUMBER_2F_202_B9: '2F-202-B-009',
        SERIALNUMBER_2F_202_B10: '2F-202-B-010',
        SERIALNUMBER_2F_202_B11: '2F-202-B-011',
        SERIALNUMBER_2F_202_B12: '2F-202-B-012',
        SERIALNUMBER_2F_202_B13: '2F-202-B-013',
        SERIALNUMBER_2F_202_B14: '2F-202-B-014',
        SERIALNUMBER_2F_202_B15: '2F-202-B-015',
        SERIALNUMBER_2F_202_C1: '2F-202-C-001',
        SERIALNUMBER_2F_202_C2: '2F-202-C-002',
        SERIALNUMBER_2F_202_C3: '2F-202-C-003',
        SERIALNUMBER_2F_202_C4: '2F-202-C-004',
        SERIALNUMBER_2F_202_C5: '2F-202-C-005',
        SERIALNUMBER_2F_202_C6: '2F-202-C-006',
        SERIALNUMBER_2F_202_C7: '2F-202-C-007',
        SERIALNUMBER_2F_202_C8: '2F-202-C-008',
        SERIALNUMBER_2F_202_C9: '2F-202-C-009',
        SERIALNUMBER_2F_202_C10: '2F-202-C-010',
        SERIALNUMBER_2F_202_C11: '2F-202-C-011',
        SERIALNUMBER_2F_202_C12: '2F-202-C-012',
        SERIALNUMBER_2F_202_C13: '2F-202-C-013',
        SERIALNUMBER_2F_202_C14: '2F-202-C-014',
        SERIALNUMBER_2F_202_C15: '2F-202-C-015',
        SERIALNUMBER_2F_202_D1: '2F-202-D-001',
        SERIALNUMBER_2F_202_D2: '2F-202-D-002',
        SERIALNUMBER_2F_202_D3: '2F-202-D-003',
        SERIALNUMBER_2F_202_D4: '2F-202-D-004',
        SERIALNUMBER_2F_202_D5: '2F-202-D-005',
        SERIALNUMBER_2F_202_D6: '2F-202-D-006',
        SERIALNUMBER_2F_202_D7: '2F-202-D-007',
        SERIALNUMBER_2F_202_D8: '2F-202-D-008',
        SERIALNUMBER_2F_202_D9: '2F-202-D-009',
        SERIALNUMBER_2F_202_D10: '2F-202-D-010',
        SERIALNUMBER_2F_202_D11: '2F-202-D-011',
        SERIALNUMBER_2F_202_D12: '2F-202-D-012',
        SERIALNUMBER_2F_202_D13: '2F-202-D-013',
        SERIALNUMBER_2F_202_D14: '2F-202-D-014',
        SERIALNUMBER_2F_202_D15: '2F-202-D-015',
        SERIALNUMBER_2F_202_D16: '2F-202-D-016',
        SERIALNUMBER_2F_202_D17: '2F-202-D-017',
        SERIALNUMBER_2F_202_D18: '2F-202-D-018'
    };
